package com.imageim.yimirror.ui.adapter.tryCloth;

import android.content.Context;

import com.imageim.yimirror.R;
import com.imageim.yimirror.bean.dailyPhoto.PhotoBgBean;
import com.imageim.yimirror.common.util.LogUtil;
import com.imageim.yimirror.service.filter.MyFilterType;

import org.byteam.superadapter.IMulItemViewType;
import org.byteam.superadapter.SuperAdapter;
import org.byteam.superadapter.SuperViewHolder;

import java.util.List;

/**
 * 试穿留影滤镜列表
 * Created by Bruce.Zhou on 2018/11/22 11:36.
 * Email: 907160968@qq.com
 */
public class FilterListAdapter extends SuperAdapter<MyFilterType> {

    private int[] filterImgs = new int[] {R.drawable.filter_normal, R.drawable.filter_in1977, R.drawable.filter_amaro, R.drawable.filter_brannan
            , R.drawable.filter_early_bird, R.drawable.filter_hefe, R.drawable.filter_hudson, R.drawable.filter_inkwell
            , R.drawable.filter_lomofi, R.drawable.filter_lord_kelvin, R.drawable.filter_nashville, R.drawable.filter_rise
            , R.drawable.filter_sierra, R.drawable.filter_sutro, R.drawable.filter_toaster, R.drawable.filter_valencia
            , R.drawable.filter_walden, R.drawable.filter_xproii}; // 17kind
    public FilterListAdapter(Context context, List<MyFilterType> items, int layoutResId) {
        super(context, items, layoutResId);
    }

    public FilterListAdapter(Context context, List<MyFilterType> items, IMulItemViewType<MyFilterType> mulItemViewType) {
        super(context, items, mulItemViewType);
    }

    @Override
    public void onBind(SuperViewHolder holder, int viewType, int layoutPosition, MyFilterType item) {
        holder.setImageResource(R.id.iv_filter, filterImgs[layoutPosition]);
        holder.setText(R.id.tv_filter_name, item.getName().replace("I_", "").toLowerCase());
    }
}
